package com.hg.design.structure.adapter.mine;

public class PowerDemo {
    public static void main(String[] args) {
        System.out.println("中国电脑开机");
        ChinaLaptop chinaLaptop = new ChinaLaptop(new ChinaPower());
        chinaLaptop.open();

        System.out.println("中国电脑开机");
        chinaLaptop = new ChinaLaptop(new AmericaPower());
        chinaLaptop.open();

        System.out.println("美国电脑开机");
        AmericaLaptop americaLaptop = new AmericaLaptop(new ChinaPower());
        americaLaptop.open();

        System.out.println("美国电脑开机");
        americaLaptop = new AmericaLaptop(new AmericaPower());
        americaLaptop.open();
    }
}
